package edu.nf.ioc.test.service.impl;

import edu.nf.ioc.annotation.Component;
import edu.nf.ioc.annotation.Inject;
import edu.nf.ioc.test.dao.UserDao;
import edu.nf.ioc.test.service.UserService;

@Component("service")
public class UserServiceImpl implements UserService {

    private UserDao dao;

    @Inject(name = "dao")
    public void setDao(UserDao dao) {
        this.dao = dao;
    }

    @Override
    public void add() {
        dao.save();
    }
}
